#include <iostream>
#include <vector>

using namespace std;

bool searchMatrix(vector<vector<int>>& matrix, int target) {
    int m = matrix.size(), n = matrix[0].size();

    for (int i = 0; i < m; ++i)
    {
        int left = 0, right = n - 1;
        while (left < right)
        {
            int mid = (left + right) >> 1;
            if (matrix[i][mid] < target)
                left = mid + 1;
            else
                right = mid;
        }
        if (matrix[i][left] == target)
            return true;
    }

    return false;
}

int main()
{

	return 0;
}